;;; Require
(require 'paredit)


;;; Code:

(dolist (hook (list
               'c-mode-common-hook
               'c-mode-hook
               'c++-mode-hook
               'java-mode-hook
               'haskell-mode-hook
               'emacs-lisp-mode-hook
               'lisp-interaction-mode-hook
               'lisp-mode-hook
               'maxima-mode-hook
               'ielm-mode-hook
               'sh-mode-hook
               'makefile-gmake-mode-hook
               'php-mode-hook
               'python-mode-hook
               'js-mode-hook
               'go-mode-hook
               'qml-mode-hook
               'jade-mode-hook
               'css-mode-hook
               'ruby-mode-hook
               'coffee-mode-hook
               'rust-mode-hook
               'qmake-mode-hook
               'lua-mode-hook
               'swift-mode-hook
               'minibuffer-inactive-mode-hook
               ))
  (add-hook hook '(lambda () (paredit-mode 1))))


(bind-keys*
 ("M-[" . paredit-backward-slurp-sexp)
 ("M-]" . paredit-forward-slurp-sexp)
 ("M-{" . paredit-backward-barf-sexp)
 ("M-}" . paredit-forward-barf-sexp))

;; Note: in default,
;; "M-s" 'paredit-splice-sexp
;; "M-S" 'paredit-split-sexp
;; (bind-key* "M-j" 'paredit-join-sexps)


(provide 'init-paredit)

;;; init-paredit.el ends here
